<?php

namespace App\Http\Requests\Validators\Backend\EdgeManage;

use App\Http\Requests\Validators\BaseValidator;

class BannerValidator extends BaseValidator
{
    public function storeRules()
    {
        return [
            'type' => 'required | in:1,2',
            'link' => 'required | string',
        ];
    }

    public function editRules()
    {
        return [
            'type' => 'in:1,2',
            'link' => 'string',
        ];
    }

    public function searchRules()
    {
        return [
            'type' => 'in:1,2',
            'link' => 'string',
            'begin_time' => 'date_format:Y-m-d H:i:s',
            'end_time' => 'date_format:Y-m-d H:i:s',
        ];
    }
}
